An electronic device, such as an smart phone or a personal digital assistant (PDA) usually includes one or more folders, and the folders store application icons of the electronic device. When the user wants to remove the folders which enclose the application icons, two traditional methods are provided: removing the folders from the touch screen directly or removing the application icons from the folders one by one before the folders are removed automatically when no application icon is left. However, the application icons can be removed at the same time if the folders are directly removed from the touch screen, and removing the application icons from the folders one by one wastes too much time.